import { memberCollectPost } from '@/api/user'
import { ElMessage } from 'element-plus'
import { ref } from 'vue'

const collectGoods = async goodsId => {
  const goodsData = ref({
    collectType: 1,
    collectObjectIds: [goodsId]
  })
  await memberCollectPost(goodsData.value)
  ElMessage.success('收藏成功')
}

export default collectGoods
